Method and apparatus for capturing images and associated 3D model based on a single image sensor and structured-light patterns in the visible spectrum

ABSTRACT

A method and apparatus of capturing non-structured light images and structured light images for deriving depth information are disclosed. According to the method, one or more non-SL (non-structured light) images without structured light and one or more initial SL (structured light) images formed on a common image plane are captured by projecting structured light patterns in a visible spectrum with the structured light source adjusted to generate initial structured light at an initial intensity level. The signal quality of structured light patterns reflected from one or more objects is evaluated based on the non-SL images and the initial SL images. If the signal quality of structured light patterns is below a threshold, a next set of SL images are captured by increasing the structured light level from a previous level until the signal of the structured light patterns is satisfactory.

CROSS REFERENCE TO RELATED APPLICATIONS

The present invention is related to U.S. patent application Ser. No.14/884,788, filed on Oct. 16, 2015. The U.S. Patent Applications ishereby incorporated by reference in its entirety.

FIELD OF THE INVENTION

The present invention relates to capturing images and associated 3Dmodel by illuminating objects with structured-light patterns. Inparticular, the present invention addresses the low cost solutiontargeted for applications in a non-static environment and having aconstraint of no or just a little disturbing structured light (SL).

BACKGROUND AND RELATED ART

In recent years, three-dimensional (3D) imaging has found variousapplications, such as virtual-reality visualization, manufacturing,machine vision, surgical models, authentication, etc. The 3D images maybe captured using a regular camera for the texture information and aseparate depth camera (e.g. Time of Flight camera) for the depthinformation of objects in the scene in the field of view. The 3D imagesmay also be captured using multiple cameras, where multiple cameras areoften used in a planar configuration to capture a scene from differentviewing angles. Point correspondence is then established among multipleviews for 3D triangulation.

Another 3D imaging technology, named structured light technology, hasbeen developed to derive the depth or shape of objects in the sceneusing a single camera. In the structured light (SL) system, one or morelight sources and a projector are often used to project known geometricpattern(s) onto objects in the scene. A regular camera can be used tocapture images with and without the projected patterns. The imagescaptured with and without the structured light can be used to derive theshapes associated with the objects in the scene. The depth or shapeinformation is then used for the regular images, which are capturedwithout structured light, to create 3D textured model of the objects.The structured light technology has been well known in the field. Forexample, in “Structured-light 3D surface imaging: a tutorial” (Geng, inAdvances in Optics and Photonics, Vol. 3, Issue 2, pp. 128-160, Mar. 31,2011), structured light technology using various structured lightpatterns are described and the corresponding performances are compared.In another example, various design, calibration and implement issues aredescribed in “3-D Computer Vision Using Structured Light: Design,Calibration and Implementation Issues” (DePiero et al., Advances inComputers, Volume 43, Jan. 1, 1996, pages 243-278). In U.S. Pat. No.8,493,496, issued on Jul. 23, 2013, a method and apparatus for mappingan object are disclosed. According to U.S. Pat. No. 8,493,496, atransparency containing a plurality of micro-lenses is arranged in anon-uniform pattern. A light source, which is configured totrans-illuminate the transparency with optical radiation and themicro-lenses are configured to focus the optical radiation to form, at afocal plane, respective focal spots in a non-uniform pattern. An imagesensor captures an image of the pattern that is projected onto theobject for reconstructing a 3D map of the object. The details of thestructured light technology are well-known in the field and thereforethe details are not repeated here.

Recently, structured light imaging has been used for facial recognitionas an authentication method for a user to unlock a mobile device such asa smart phone. The structured light 3D system is often intended formapping an object in a static environment, where the object isstationary. Furthermore, in order to derive reliable 3D model, thestructured-light images are often captured using a structured light atmuch higher intensities than the ambient light. Therefore, theconventional structured light imaging approach may not suitable for the3D facial recognition in mobile device since the strong structured lightis not only disturbing, but also raises eye safety concerns. In order toovercome the issues, a system introduced to the market uses dedicatedcamera to capture structured-light images. Furthermore, near-infraredlight sources are used to project the structured-light patterns to avoidor reduce disturbance to the subject during structured-light imagecapture. For example, iPhone X™ recently introduced by Apple Inc.™incorporates a structured-light transmitter using a VCSEL(vertical-cavity surface-emitting laser) as a light source to project30,000 dots onto an object (Zac Hall, “iPhone X's one design limitationrumored to be improved next year”, 9to5Mac Online Article, Jan. 16,2018, https://9to5mac.com/2018/01/16/iphone-12-almost-notchless/). Astructured light receiver comprising a 1.4 MP CMOS (complementarymetal-oxide-semiconductor) sensor with a near-infrared filter is used tocapture structured light images. Furthermore, iPhone X™ includes a floodilluminator (Alex Webb and Sam Kin, “Inside Apple's Struggle to Get theiPhone X to Market on Time”, Bloomberg Technology, Oct. 25, 2017,https://www.bloomberg.com/news/articles/2017-10-25/inside-apple-s-struggle-to-get-the-iphone-x-to-market-on-time+&cd=1&hl=en&ct=clnk&gl=us),which beams an infrared light for the infrared camera to establish thepresence of a face. While the use of a separate sensor and light sourcein the non-visible light spectrum provides a reliable means forcapturing structured light images, the solution is quite costly due tothe additional components required (i.e., the dot projector/VCSEL lightsource, the flood illuminator and the infrared camera). FIG. 1illustrates an example of the mobile phone 100 in the market with thestructured light for face recognition, where the dot projector/VCSELlight source 110, an infrared camera 120, a flood illuminator 130 and afront camera 140 are shown.

For any consumer application, the cost is a very sensitive factor totake into consideration. It is desirable to develop 3D structured lightimaging systems with reduced components while maintaining the qualityand accuracy as the system with a separate structured light projectorand separate structured light image sensor, and without causingnoticeable disturbance to the subject.

BRIEF SUMMARY OF THE INVENTION

A method and apparatus of capturing images of a scene using a cameracomprising an image sensor and one or more structured light sources forderiving depth information are disclosed. According to the method, oneor more non-SL (non-structured light) images formed on a common imageplane are captured using the image sensor during one or more first frameperiods without any structured light source on. One or more initial SL(structured light) images formed on the common image plane are capturedusing the image camera during one or more second periods by projectingstructured light patterns in a visible spectrum with said one or morestructured light source adjusted to generate initial structured light atone or more initial intensity levels. The signal quality of structuredlight patterns reflected from one or more objects in a field of view ofthe image sensor is evaluated based on said one or more non-SL imagesand said one or more initial SL images. If the signal quality ofstructured light patterns is below a threshold, repeating followingsteps until the signal quality of structured light patterns is equal toor above the threshold: selecting one or more target intensity levelsfrom a range or a group comprising one target intensity level higherthan at least one previous intensity level for said one or morestructured light sources; capturing one or more next SL images formed onthe common image plane as one or more target SL images during one ormore third periods by projecting the structured light patterns in thevisible spectrum with said one or more target intensity levels selected;and evaluating signal quality of structured light patterns reflectedfrom one or more objects in the field of view of the image sensor basedon said one or more non-SL images and said one or more target SL images.If the signal quality of structured light patterns is satisfactory, saidone or more non-SL images and one or more final target SL images areprovided, where said one or more final target SL images correspond tosaid one or more target SL images captured in a last iteration.

The method may further comprise capturing, by the image sensor, aregular image formed on the common image plane using the image sensorduring a regular frame period by setting the image sensor to a regularmode without any structured light source on, wherein said one or morefirst frame periods, said one or more second periods and said one ormore third periods may be substantially less than the regular frameperiod. For example, said one or more first frame periods, said one ormore second periods and said one or more third periods are equal to orless than ⅛ of the regular frame period.

In one embodiment, the image sensor is set to a fast-capture mode duringcapturing said one or more non-SL images, said one or more initial SLimages and said one or more next SL images referred to as fast-modeimages to cause said one or more first frame periods, said one or moresecond periods and said one or more third periods substantially shorterthan a regular frame period used to capture a regular image by the imagesensor. The fast capture mode may correspond to setting the image sensorby reducing bit depth associated with analog-to-digital converter (ADC)of the image sensor or spatial resolution, or increasing readout gain ofthe image sensor with reference to the regular mode. The fast-capturemode may also correspond to reducing spatial resolution of the imagesensor by setting the image sensor to reduce spatial resolution bybinning neighboring sensor pixels of a same color.

In one embodiment, said evaluating the signal quality of structuredlight patterns reflected from one or more objects in a field of view ofthe image sensor comprises evaluating signal-to-noise ratio, averagesignal or peak signal of the structured light patterns reflected fromone or more objects in a field of view of the image sensor.

In one embodiment, said one or more structured light sources comprisemultiple light sources with different spectral densities, and saidmultiple light sources are adjusted to maximize structured light toambient-light signal ratio among color planes of the image sensor.

In one embodiment, said one or more initial intensity levels aredetermined according to image intensities of said one or more non-SLimages and distance information between the camera and a target objectdetected by a distance sensor. In another embodiment, said one or moreinitial intensity levels are determined according to ambient lightinformation from an ambient light sensor and distance information.

The method may further comprise applying averaging, median filter oroutlier rejection to said one or more non-SL images to derive anenhanced non-SL image, applying averaging, median filter or outlierrejection to said one or more initial SL images to derive a processedinitial SL image and applying averaging, median filter or outlierrejection to said one or more target SL images to derive an enhanced SLimage. The signal quality of structured light patterns reflected fromone or more objects in the field of view of the image sensor isevaluated based on the enhanced non-SL image and the processed initialSL image, or based on the enhanced non-SL image and the enhanced SLimage. The method may further comprise deriving depth information forone or more objects in the field of view of the image sensor based ondifferences between the enhanced non-SL image and the enhanced SL image.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an example of the mobile phone in the market with thestructured light for face recognition, where the dot projector/VCSELlight source, an infrared camera, a flood illuminator and a front cameraare shown.

FIG. 2A illustrates a simplified block diagram of an integrated imagesensor incorporating an embodiment of the present invention.

FIG. 2B illustrates a simplified block diagram of an integrated imagesensor incorporating an embodiment of the present invention.

FIG. 3 illustrates an exemplary block diagram of an apparatusincorporating an embodiment of the present invention to capture imageswith and without the structured light and regular images using the sameimage sensor.

FIG. 4 illustrates an exemplary flowchart for capturing a set of non-SLimages without the structured light and one or more sets of SL imageswith successively increasing structured light intensities according toan embodiment of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

It will be readily understood that the components of the presentinvention, as generally described and illustrated in the figures herein,may be arranged and designed in a wide variety of differentconfigurations. Thus, the following more detailed description of theembodiments of the systems and methods of the present invention, asrepresented in the figures, is not intended to limit the scope of theinvention, as claimed, but is merely representative of selectedembodiments of the invention. References throughout this specificationto “one embodiment,” “an embodiment,” or similar language mean that aparticular feature, structure, or characteristic described in connectionwith the embodiment may be included in at least one embodiment of thepresent invention. Thus, appearances of the phrases “in one embodiment”or “in an embodiment” in various places throughout this specificationare not necessarily all referring to the same embodiment.

Furthermore, the described features, structures, or characteristics maybe combined in any suitable manner in one or more embodiments. Oneskilled in the relevant art will recognize, however, that the inventioncan be practiced without one or more of the specific details, or withother methods, components, etc. In other instances, well-knownstructures, or operations are not shown or described in detail to avoidobscuring aspects of the invention. The illustrated embodiments of theinvention will be best understood by reference to the drawings, whereinlike parts are designated by like numerals throughout. The followingdescription is intended only by way of example, and simply illustratescertain selected embodiments of apparatus and methods that areconsistent with the invention as claimed herein.

As mentioned above, for certain structured light applications, it isdesirable to cause the structured light imperceptible so as not todisturb the subject, whose image being captured for 3D mapping. Theconventional structured light systems often use bright laser source toproject structured patterns, which works fine for static objects.Nevertheless, such systems may not be suitable for human subjects forsafety concerns since the bright light may harm subject's eyes.Furthermore, a subject may be in motion and there may be substantialdifferences between structured light (SL) image and a correspondingregular image of the subject.

One solution being practiced in the field utilizes imperceptible lightsource in the infrared or near infrared band along with a matching imagesensor to capture images in the imperceptible light band. While thissystem works satisfactorily, it increases system cost due to additionalcomponents required (e.g. the matching image sensor and infrared lightsource). Therefore, it is desirable to develop a low cost system thatcan reliably capture 3D information of an object (e.g. a human subject)without causing noticeable disturbance to the object. Besides capturingthe 3D information of the subject, it is also desirable to capture animage of the object in good quality. The 3D information of the objectcan be correlated with the object for various applications. For example,the object may correspond to a human subject's face and the 3D faceinformation can be used for authentication of the subject by matchingthe current derived 3D face information with previously stored 3D faceinformation of the subject.

Recently, a smartphone based 3D mapping system has been disclosed by Gaoet al. (“A smartphone-based laser distance sensor for outdoorenvironments”, 2016 IEEE International Conference on Robotics andAutomation (ICRA), Stockholm, Sweden, May 16-21, 2016, pp. 2922-2929),where a line laser is used as the structured light source, a bandpassfilter is used to reduce the ambient light flux, and a CMOS image sensoris used to capture laser illumination reflected off objects. The objectdistance from the camera is derived by using the processing resources ofthe smartphone. The system is capable of detecting object distances inambient light and sunlight conditions. One targeted application is LDS(laser distance system) for robotic vehicles. While the system canachieve low cost, it is mainly used for detecting distances of objects(e.g. obstacles) and doesn't care much for possible disturbance tosubjects beyond eye safety level. Furthermore, the image sensor forcapturing images corresponding to laser illumination reflected offobjects is not used for capturing regular image since the LDS mainlycares for the object distances that may be obstacles to the vehicle.Instead, the smartphone has a built-in high-quality image sensor forcapturing regular images/videos. Therefore, the system by Gao et al.does not solve the issue of low cost system for capturing structuredlight images and regular images without projecting disturbing structuredlight.

In the present invention, a low cost system that captures structuredlight (SL) images and regular images using the same image sensor withoutprojecting very noticeable disturbing structured light. In a camera, theimage sensor is positioned in the image plane where the camera opticprojects a scene in the field of view (FOV) onto. When the same imagesensor is used, the scene in the FOV is projected to the same imageplane regardless of structured light image or regular image.Furthermore, it is intended for applications that the object (e.g. humansubject) may be non-stationary. For the present system, the same imagesensor is used to capture structured light images as well as regularimages. In U.S. patent application Ser. No. 14/884,788, a capsule cameracapturing structured light images and regular images using the sameimage sensor is disclosed. In the human gastrointestinal environment,there is no ambient light. Therefore, the structured light image alongcan be used to derive the 3D information, such as depth and shape of anobject. For the current intended application, the ambient light oftenexists and may even correspond to strong sunlight. Therefore, when astructured light image is captured, the image corresponds to a mixtureof an image corresponding to the structured light and an imagecorresponding to the ambient light. In order to derive 3D informationusing the structured light, an image without the structured light (i.e.,the image corresponding to ambient light only) needs to be captured aswell. Accordingly, structured light specific image (i.e., correspondingreflected structured light from the object in the scene) can be derivedfrom the difference of these two images if the scene is stationary. Inthe case that a structured light source in the visible band is used, thelight intensity from the structured light has to be high enough so thatthe structured light patterns can be detected. Under the ambient lightenvironment, if there is no motion or little motion between the capturedimage with structured light and the captured image without structuredlight, a difference between the two images reveals the structured lightreflected from the object. The image captured with the structured lightis referred as an SL image and the image captured without the structuredlight is referred as a non-SL image in this disclosure. The depth ofobjects in the field of view (FOV) of the camera can be derived from thestructured light patterns reflected from the objects. For example, thedifference image between the SL image and the non-SL image can be usedto derive the 3D information of the. The phrase “with the structuredlight” in this disclosure refers the case that the structured light ison. The phrase “without the structured light” in this disclosure refersthe case that the structured light is off. Furthermore, the case thatthe structured light is off also includes the case that the structuredlight is substantially off, such as only 10% or less of the intendedintensity.

In order to minimize the possible disturbance that the structured lightin the visible light spectrum may cause to a subject, the presentinvention discloses a method that captures a non-SL image and an initialtest SL images by setting an initial low-intensity structured light. Thestructured light patterns reflected from objects in the field of view ofthe camera can be derived from the non-SL image and the initial test SLimage. The quality of the structured light patterns reflected fromobjects is checked. If the quality of the structured light patternsreflected from objects is not good enough, the intensity of thestructured light sources is then selected to be one intensity levelincreased from a previous intensity level until the quality of thestructured light patterns reflected from objects is good enough, such asthe difference between SL image and non-SL image can enable theprocessor to reliably detect the structure light patterns. In each step,a new test SL image is captured and the structured light patternsreflected from objects in the field of view of the camera can be derivedagain from the non-SL image and the new test SL image. In one example,the intensity of the structured light sources can be selected to besuccessively increasing. In this case, the procedure of increasing theintensity of the structured light sources, capturing a new SL image,deriving the structured light patterns reflected from objects andchecking the quality of the structured light patterns reflected fromobjects is repeated until the quality of the structured light patternsreflected from objects is good enough.

In the above, the non-SL image and the initial test SL images can becaptured with individual frame periods. For example, the non-SL imagecan be captured during a first period and the initial SL image can becaptured during a second period. The first period and the second periodmay be of the same or different lengths. Furthermore, the new SL imagemay be captured using individual frame period (referred to as a thirdperiod). Again, the first period, second period and third period can beof the same or different lengths.

The quality of the structured light patterns reflected from objectsdepend on how reliable the structured light patterns reflected fromobjects are in the present of various noises, such as the shot noisefrom the sunlight, object movement, etc. The quality of the structuredlight patterns reflected from objects can be measured in various ways,such as signal-to-noise ratio, average or peak signal level of thestructured light patterns reflected from objects, etc.

The present invention is intended to be used in various ambient lightconditions, including bright sunlight environment. Sometimes, sunlightmay be bright and the image sensor exposure time needs to be reduced toprevent saturation. On the other hand, the structured light source hasits limitation in terms how high the power can go. Furthermore, thestrong sunlight may result in large shot noise and within such shortexposure time the structured light may be barely large enough for theimage sensor to cause enough electron signals to overcome the shotnoise. Most image sensors today on the market support a low spatialresolution mode by combining or binning the pixels of the same color inthe neighborhood in the analog domain or digitally. While the binningmode allows operating the image sensor at a higher frame rate with lowerspatial resolutions, the binning operation is important in terms of itseffect in enhancing signal to noise ratio.

In selecting the non-SL image intensity, there are preferred levels interms of pixel well capacity of the image sensor for circumstances suchas the strong sunlight being present. At the same time, a structuredlight pattern will be superimposed on top of the non-SL image intensityfor capturing the SL-images. For the purpose of emphasizing the point,let's consider only the shot noise. The light energy is to be convertedinto photons in the pixel potential well of the image sensor. In theequation below, E_(SL) denotes the structured light energy, whichcorresponds to the product of structured light power intensity P_(SL)and the exposure time t_(e). The same applies for ambient light energy,E_(A), which represents energy due to ambient light. Accordingly, E_(a)is equal to the product of ambient light power P_(A) and t_(e). Thefollowing equation for SNR (signal to noise ratio), the SNR is largerwhen t_(e) is larger. Therefore, the favorable condition should be toallow the pixel potential well be close enough to saturation.Accordingly, the level is preferred to be higher than a target pixelvalue and the target pixel value should be in a range covering pixelvalues near the maximum pixel value with some margin to avoid overexposure. For example, for 8-bit sensor outputs, the range can be from160 to 240 according to one embodiment. For example, the target pixelvalue can be selected as 200. As is understood, the pixel values varyacross the image area. In one embodiment, the pixel values in thecentral region of the image are used for choosing the exposure timet_(e). For example, in the facial authentication application for mobilephones, the middle region of the image corresponds to the subject face,which is the target to be processed. In one embodiment, the exposuretime t_(e) is selected so that the histogram of the pixel values in themiddle region of the image has the highest values around 210.

$\begin{matrix}{{S\; N\; R} = \frac{E_{SL}}{\sqrt{E_{A} + E_{SL}}}} \\{= \frac{P_{SL}t_{e}}{\sqrt{{P_{A}t_{e}} + {P_{SL}t_{e}}}}} \\{= {\frac{P_{SL}}{\sqrt{P_{A} + P_{SL}}}{\sqrt{t_{e}}.}}}\end{matrix}$

In order to further improve the quality of the structured light patternsreflected from objects in the FOV of the image sensor, anotherembodiment of the present invention captures multiple SL images andmultiple non-SL images to derive the structured light patterns. Themultiple SL and non-SL image are captured with a selected structuredlight intensity comprising one intensity level increased from a previousintensity level until the quality of the structured light patterns issatisfactory. The multiple SL images in each set do not have to becaptured with the same SL light intensity. In other words, the multipleSL images in each set can be captured with different SL intensities. Inone embodiment, the structured light intensity can be ramped up from lowto high until the quality of the structured light patterns issatisfactory. According to this embodiment, a set of non-SL images arecaptured without the structured light and a set of SL images arecaptured with the structured light at a same intensity or at differentintensity levels. The structured light patterns derived from multiple SLimages and multiple non-SL images should have enhanced signal-to-noiseratio. Accordingly, the quality of the structured light patterns shouldbe improved. The quality of the structured light patterns is checkedafter each set of SL images is captured at one or more new structuredlight intensity level. If the quality of the structured light patternsis not good enough, a next set of SL images is captured with theintensity of the structured light increased from a previous level. Inthis case, only one set of non-SL images is captured. However, multiplesets of SL images may need to be captured, where each set of the SLimages is captured with a same structured light intensity or withdifferent SL intensity levels. When different intensity levels are usedfor each set of SL images, said one or more new SL intensity levels areselected from a range or a group comprising one target intensity levelincreased from at least one previous intensity level. When the set of SLimages uses the same SL intensity, the structured light intensity isincreased from a previous set for each new set of SL images. Whendifferent intensity levels are used for each set of SL images, at leastone of the new SL image is captured with a target intensity lower thanat least one previous intensity. The procedure of capturing a new set ofSL images with an increased structured light intensity and evaluatingthe quality of the structured light patterns is repeated until thequality of the structured light patterns is satisfactory.

When multiple SL images and multiple non-SL images are used to derivethe structured light patterns, the set of SL images may be combined toform an enhanced SL image. Also, the set of non-SL images may becombined to form an enhanced non-SL image. If there is no motion in theset of SL and non-SL images, the enhanced SL and non-SL images may bederived as the average of the set of SL and non-SL images respectively.However, if there is motion in the set of SL images or the set of non-SLimages, the processing should take into account of the motion within theset of SL or non-SL images. Various motion estimation and compensationtechniques are known in the field of video processing/compression. Thesemotion estimation and compensation techniques can be applied to the setof SL and non-SL images to compensate the motion before combining theseSL or non-SL images. In the case of mobile phone application, the motionin the set of SL and non-SL images may be caused by an unsteady handholding the mobile phone. In this case, the motion in the multiple SL ornon-SL images may be processed using global motionestimation/compensation.

Another technique to alleviate the motion problem is to shorten theperiod between two consecutive images to capture images in higher rates.Therefore, according to the present invention, a fast capture mode isapplied for capturing the set of S image and the set of non-SL images.In the fast mode, the frame period for capturing an image issubstantially shortened. For example, the frame period is reduced to ⅛or less of a regular frame period. If the camera is operated at 30 fps(frames per second), the fast mode corresponds to 240 fps. Therefore,the time difference between a structured light image and a correspondingimage without the structured light becomes 1/240 second. For such ashort time period, the motion between two consecutive images is expectedto insignificant.

In U.S. patent application Ser. No. 14/884,788, a single image sensorcamera is disclosed to capture structured light image and regular imagefor human gastrointestinal (GI) tract imaging applications. Since thereis no ambient light in the GI environment, the structured light imagecorresponds to the structured light reflected from the object. Someexamples are disclosed in U.S. patent application Ser. No. 14/884,788 tocapture the structured light in shortened frame period (i.e., in fastcapture more). For example, the image sensor can be configured tooperate in a reduced dynamic range by reducing bit depth or spatialresolution of the structured-light image compared to the regular image.Furthermore, the gain in readout circuits of the sensor can be set highto capture the structure light image in shortened frame period.

FIG. 2A illustrates one example of a simplified block diagram of anintegrated image sensor 200 incorporating an embodiment of the presentinvention. The integrated image sensor comprises a pixel array (210)being responsive to light energy received by the pixel array to producesignal data having a voltage level depending on the light energyreceived, readout circuits (220) coupled to the pixel array to accessthe signal data produced by the pixel array, gain control 250 coupled tothe readout circuits 220 also includes gain control 250 to adjust thegain of the output signal from the pixel arrays 210, one or moreanalog-to-digital converters (ADCs, 230) having a first dynamic rangeand a second dynamic range, and timing/control circuits (240 a and 240b). The pixel array may consist of monochrome pixels or color pixels.The pixel array can be based on the CMOS technology or the CCDtechnology. The output circuits are coupled to the pixel array under thecontrol of the timing/control circuits. For example, the pixel arrayoutputs can be transferred to the output circuits row by row under thecontrol of the timing/control circuits. The output circuits may alsoinclude amplifier and CDS circuit, where the CDS circuit is used to takecare of the offset in individual pixels after reset. While thetiming/control circuits (240 a and 240 b) are shown as two separateblocks, they may also be implemented as a unified block.

FIG. 2B illustrates another example of a simplified block diagram of anintegrated image sensor 260 incorporating an embodiment of the presentinvention. The simplified block diagram of an integrated image sensor260 is similar to that in FIG. 2A. However, the gain control function isembedded in the readout circuits 270 and ADCs 280, where gain input 1corresponds to a gain control signal to adjust the output gain of thereadout circuits and gain input 2 corresponds to a gain control signalto adjust the gain of ADCs 280.

The ADC circuit(s) is capable of operating at a first dynamic range anda second dynamic range. The first dynamic range is smaller than thesecond dynamic range. For example, the first dynamic range maycorrespond to 6 bits and the second dynamic range may correspond to 9bits. The ADC dynamic range is also referred as ADC resolution or bitdepth. In the above example, the ADC supports 6-bit resolution and 9-bitresolution or the bit depth supported by the ADC is 6 bits or 9 bits.Individual ADCs with different dynamic ranges may be used. Since thestructured-light image and the regular image are captured in serialinstead of parallel, a single ADC with configurable dynamic range mayalso be used. For example, an adaptively configurable ADC is disclosedin U.S. Pat. No. 8,369,458 issued to Wong et al. on Feb. 5, 2013. Thetiming/control circuits may include row scan circuit and column scancircuit. The timing/control circuits are also responsible to generatevarious control signals such as reset signals. In the following,preferred embodiments are provided regarding configuring the imagesensor to capture structured-light images and regular images.

In FIG. 2A, the gain control 250 may be set to high so as to reduce therequired exposure time. In FIG. 2B, the gain input 1 to the readoutcircuits 270 and/or the gain input 2 to the ADCs 280 may also be set tohigh so as to reduce the required exposure time. When structured lightis turned on to illuminate the subject, it is desirable to keep theexposure time short and/or to keep the intensity low so as not to causevery noticeable disturbance the subject. Therefore, the gain can be sethigh in the fast capture mode. However, if ambient light (e.g. sunlight)is strong, the gain needs to be set to an appropriate lower level toavoid pixel values in saturation and the structure light needs to besufficiently stronger than the shot noise due to strong ambient light.

Reducing the sensor spatial resolution can also help to increase framerate (i.e., reducing the frame capture time). The reduced spatialresolution can be achieved by sub-sampling or binning. The subsamplingtechnique simply skipping pixels in the horizontal and/or verticaldirection so that an image frame can be quickly read out. As mentionedearlier, pixel binning is another technique to increase frame rate byreducing the spatial resolution. Pixel binning combines the charges frommultiple pixels horizontally and/or vertically in the analog or digitaldomain. It not only increases frame rate, but also increases thesignal-to-noise ratio (SNR) of the captured image. Currently, bothreduced spatial resolution techniques are available in variouscommercial image sensor products.

Upon capturing a set of fast-mode SL images and a set of fast-modenon-SL images, the structured light patterns reflected from the objectcan be determined from the set of fast-mode SL images and the set offast-mode non-SL images, and 3D information, such as the shape or depth,associated with the object can be derived. In an embodiment mentionedearlier, a set of non-SL images is captured without structured light andsets of SL images are captured by selecting structured light intensitiesincluding one intensity level increased from a previous intensive leveluntil the quality of the structured light patterns is satisfactory. Forexample, the structured light intensities selected correspond tosuccessively increasing structured light intensities. The fast capturemode can be applied to the embodiment by capturing a set of fast-modenon-SL images captured without structured light and capturing sets offast-mode SL images by successively increasing structured lightintensities until the quality of the structured light patterns issatisfactory.

An exemplary apparatus for implementing the above embodiment is shown inFIG. 3, where the apparatus comprises an integrated image sensor 310,structured light sources 320 and control processor 330. Other componentsrequired for a camera system, such as optical lens and flash light arenot shown in FIG. 3. The integrated image sensor as shown in FIG. 2A orFIG. 2B may be used as the image sensor 310 in FIG. 3. While only thestructured light sources 320 are shown in FIG. 3, it is understood thatother components, such as a transparency with selected patterns andoptics to project the patterns (not shown in FIG. 3), are also needed.Control and processing unit 330 is incorporated to provide the neededcontrol signals, such as setting the image sensor to the fast-capturemode for capturing the fast-mode images in order to derive the 3Dinformation. Also, control and processing unit 330 controls theoperations of the structured light sources such as whether to turnon/off and when to turn on/off the structured light sources 320. Thecontrol and processing unit 330 may also be responsible for deriving the3D information based on the captured fast-mode images. For mobile phoneapplications, there is always a powerful processing unit (e.g.Application Processor) within the mobile phone. The mobile phoneprocessing unit can be programmed to perform the above tasks.Furthermore, it is desirable to use the same image sensor for capturingthe fast-mode images as well as regular images. Therefore, the imagesensor or image sensors in the mobile phone can be retrofitted tocapture the fast-mode images as well as regular images. Regarding thestructured light module with the structured light sources, thestructured light module will be an additional component to theconventional mobile phone since there is no need for the structuredlight module in the conventional mobile phone.

As mentioned previously, in some environments, the sunlight may bestrong. In order to derive reliable structured light patterns, a set ofnon-SL images without structured light and multiple sets of SL imageswith successively increasing structured light intensities are captured.The set of non-SL images can be combined to form an enhanced non-SLimage. Similarly, each set of SL images can be combined to form anenhanced SL image. As mentioned before, by combining the multiple imagesof the same type (i.e., SL or non-SL) can enhance image signal-to-noiseratio, which is useful to cope with various noised such as shot noiseand quantization noise. Upon the enhanced SL image and enhanced non-SLimage derived, structured light patterns can then be derived from theenhanced SL image and enhanced non-SL image. For example, the structuredlight patterns can be derived by subtracting the enhanced non-SL imagefrom the enhanced SL image. The enhanced SL image may correspond to theaverage of the set of SL images and the enhanced non-SL image maycorrespond to the average of the set of non-SL images. However, othermethods may also be used to derive the enhanced SL/non-SL image based onthe set of SL/non-SL images respectively. For example, outlier rejectioncan be applied to remove some extreme samples before or during combiningmultiple SL or non-SL images. In another example, instead of averaging,median filter can be applied to the multiple SL images to derive theenhanced SL image. Similarly, the median filter can be applied to themultiple non-SL images to derive the enhanced non-SL image. However, thestructured light patterns can be derived from the set of SL images andthe set of SL images jointly without the need for deriving the enhancedSL image from the set of SL images and deriving the enhanced non-SLimage from the set of non-SL images.

In the following, an example to capture a set of non-SL images and oneor more sets of SL images with successively increased structured lightintensities:

-   -   1. Capture, by the sensor, M non-SL images formed on a common        image plane of the camera, where M≥1.    -   2. Capture, by the sensor, N initial SL images formed on the        common image plane of the camera with the structured light set        to an initial intensity level, where N≥1.    -   3. Derive structured light patterns reflected from objects in        the field of view of the image sensor based on the M non-SL        images and the N initial SL images.    -   4. Check the quality of the structured light patterns. If the        quality is satisfactory, STOP; otherwise perform steps 5a-5c.    -   5a. Capture, by the sensor, N next SL images formed on the        common image plane of the camera with the structured light set        to a fixed intensity level for the N next SL images, where the        fixed intensity level is higher than a previous intensity level,    -   5b. Derive structured light patterns reflected from objects in        the field of view of the image sensor based on the M non-SL        images and the N next SL images, and    -   5c. Go to step 4.

As mentioned before, the current application is intended for anenvironment that the structured light will not cause very noticeabledisturbance to the subject being photographed. Therefore, the intensityof the structured light should be properly adjusted so that thestructured light will project sufficient structured light patterns forderiving 3D information of the subject. In the above example, thestructured light intensity is increase from an initial low levelsuccessively until reliable structured light patterns can be derived.The initial low level is intentionally set low to ensure that thestructured light will not disturb the subject. However, this will have adrawback since it may take more steps (i.e., more time) to ramp up thestructured light to a desired intensity level. In order to speed up thestructured light setting, an embodiment of the present inventionutilizes other useful information that may be available in the camerafor other purposes. For example, ambient light sensor is being used insome mobile phones. With the known ambient light, the initial structuredlight level can be properly selected to speed up the process ofidentifying the minimum required structured light level to obtainreliable structured light patterns. In another example, the mobile phonemay have a rough distance measure such as a proximity sensor or otherdistance measuring devices. Such device can provide an indication of anobject to the sensor. Accordingly, an embodiment can determine a properinitial structured light level based on the intensity of one or morenon-SL images and the object distance so as to speed up the process ofidentifying the minimum required structured light level to obtainreliable structured light patterns.

In yet another embodiment, the mobile device comprises light sourceshaving different emission spectra or wavelengths and the light sourcescan be selectively turned on/off or adjusted to change intensity so asto generate target spectral characteristics. On the other hand, thecolor image sensor has multiple color planes, each comprising pixelsthat have like color filters. It is desirable to adjust the structuredlight sources to maximize the structured light to ambient-light signalratio among the color planes of the color image sensor. The maximumstructured light to ambient-light signal ratio can be estimated based onone non-SL image and multiple SL images with the structured lightadjusted to generate different spectral lights. A setting that resultsin the maximum structured light to ambient-light signal ratio isselected for capturing other SL images.

In order to determine the best combined light spectra to extract morereliable differences between the SL image and the non-SL image,different settings of the light sources may be checked to select a bestone. In another embodiment of the present invention, a non-SL image iscaptured first and the color characteristics of the non-SL image areevaluated. For example, an object may correspond to the subject face,which includes mostly skin tones. If the structured light sources can beadjusted to generate target spectrum that may cause more distinct SLcolor from the majority colors of the non-SL image. Accordingly, in yetanother embodiment of the present invention, the color information ofthe test image is evaluated. The structured lights are set according toconditions including evaluated color of the first image. For example, inthe case of human face being the object in the test image, thestructured light sources will be adjusted to generate a target spectrumwith higher spectral density around the blue color which is close to acomplementary color of the skim tone. In one embodiment only blue pixelis read out to speed up the operation.

FIG. 4 illustrates an exemplary flowchart for capturing a set of non-SLimages without the structured light and one or more sets of SL imageswith successively increasing structured light intensities according toan embodiment of the present invention. According to this method, one ormore non-SL (non-structured light) images formed on a common image planeare captured using the image sensor during one or more first frameperiods without any structured light source on in step 410. One or moreinitial SL (structured light) images formed on the common image planeare captured by the image sensor during one or more second periods byprojecting structured light patterns in a visible spectrum with said oneor more structured light source adjusted to generate initial structuredlight at an initial intensity level in step 420. Signal quality ofstructured light patterns reflected from one or more objects in a fieldof view of the image sensor is evaluated based on said one or morenon-SL images and said one or more initial SL images in step 430. Asmentioned before, while a single non-SL image and a single SL image canbe captured; multiple non-SL images and multiple SL images will providebetter performance for deriving the structured light patterns. Whetherthe signal quality of structured light patterns is below a threshold ischecked in step 440. If the result is asserted (i.e., the “yes” pathfrom step 440 corresponding to the signal quality of structured lightpatterns being below a threshold), steps 450 to 470 are repeated untilthe signal quality of structured light patterns is equal to or above thethreshold. If the result of step is negative (i.e., the “no” path fromstep 440 corresponding to the signal quality of structured lightpatterns being equal to or above the threshold), the process goes tostep 480. In step 450, a target intensity level is selected from a rangeor a group comprising one target intensity level increased from aprevious intensity level for said one or more structured light sourcesIn step 460, one or more next SL images formed on the common image planeare captured using the image sensor as one or more target SL imagesduring one or more third periods by projecting the structured lightpatterns in the visible spectrum with the target intensity levelselected. In step 470, the signal quality of structured light patternsreflected from one or more objects in the field of view of the imagesensor is evaluated based on said one or more non-SL images and said oneor more target SL images. After step 470, the process goes to step 440again to check the signal quality of structured light patterns. In step480, said one or more non-SL images and one or more final target SLimages are provided as output for deriving depth information, where saidone or more final target SL images correspond to said one or more targetSL images captured in a last iteration.

The invention may be embodied in other specific forms without departingfrom its spirit or essential characteristics. The described examples areto be considered in all respects only as illustrative and notrestrictive. Therefore, the scope of the invention is indicated by theappended claims rather than by the foregoing description. All changeswhich come within the meaning and range of equivalency of the claims areto be embraced within their scope.

The invention claimed is:
 1. A method of capturing images of a sceneusing a camera comprising an image sensor and one or more structuredlight sources, the method comprising: capturing, by the image sensor,one or more non-SL (non-structured light) images formed on a commonimage plane during one or more first frame periods without anystructured light source on; capturing, by the image sensor, one or moreinitial SL (structured light) images formed on the common image planeduring one or more second periods by projecting structured lightpatterns in a visible spectrum with said one or more structured lightsource adjusted to generate initial structured light at one or moreinitial intensity levels; evaluating signal quality of the structuredlight patterns reflected from one or more objects in a field of view ofthe image sensor based on said one or more non-SL images and said one ormore initial SL images; if the signal quality of the structured lightpatterns is below a threshold, repeating following steps until thesignal quality of the structured light patterns is equal to or above thethreshold: selecting one or more target intensity levels from a range ora group comprising one target intensity level increased from at leastone previous intensity level for said one or more structured lightsources; capturing, by the image sensor, one or more next SL imagesformed on the common image plane as one or more target SL images duringone or more third periods by projecting the structured light patterns inthe visible spectrum with said one or more target intensity levelsselected; and evaluating signal quality of the structured light patternsreflected from one or more objects in the field of view of the imagesensor based on said one or more non-SL images and said one or moretarget SL images; and providing said one or more non-SL images and oneor more final target SL images, wherein said one or more final target SLimages correspond to said one or more target SL images captured in alast iteration.
 2. The method of claim 1, further comprising capturing,by the image sensor, a regular image formed on the common image planeusing the image sensor during a regular frame period by setting theimage sensor to a regular mode without any structured light source on,wherein first lengths of said one or more first frame periods, said oneor more second periods and said one or more third periods aresubstantially shorter than a second length of the regular frame period.3. The method of claim 2, wherein said first lengths of said one or morefirst frame periods, said one or more second periods and said one ormore third periods are equal to or less than ⅛ of the second length ofthe regular frame period.
 4. The method of claim 2, wherein the imagesensor is set to a fast-capture mode during capturing said one or morenon-SL images, said one or more initial SL images and said one or morenext SL images to cause first lengths of said one or more first frameperiods, said one or more second periods and said one or more thirdperiods substantially shorter than the second length of the regularframe period.
 5. The method of claim 4, wherein the fast-capture modecorresponds to reducing bit depth associated with analog-to-digitalconverter (ADC) of the image sensor or spatial resolution, or increasingreadout gain of the image sensor with reference to a regular mode. 6.The method of claim 1, wherein said one or more non-SL images, said oneor more initial SL images and said one or more next SL images arecaptured with reduced spatial resolution of the image sensor by settingthe image sensor to reduce spatial resolution by binning neighboringsensor pixels of a same color in an analog domain, or performeddigitally either inside or outside the image sensor.
 7. The method ofclaim 1, wherein said evaluating the signal quality of the structuredlight patterns reflected from one or more objects in a field of view ofthe image sensor comprises evaluating signal-to-noise ratio, averagesignal or peak signal of the structured light patterns reflected fromone or more objects in a field of view of the image sensor.
 8. Themethod of claim 1, wherein said one or more structured light sourcescomprise multiple light sources with different spectral densities, andsaid multiple light sources are adjusted to maximize structured light toambient-light signal ratio among color planes of the image sensor. 9.The method of claim 1, wherein said one or more initial intensity levelsare determined according to image intensities of said one or more non-SLimages and distance information between the camera and a target objectdetected by a distance sensor.
 10. The method of claim 1 wherein saidone or more initial intensity levels are determined according to ambientlight information from an ambient light sensor and distance information.11. The method of claim 1, further comprising applying averaging, medianfilter or outlier rejection to said one or more non-SL images to derivean enhanced non-SL image, applying averaging, median filter or outlierrejection to said one or more initial SL images to derive an enhancedinitial SL image and applying averaging, median filter or outlierrejection to said one or more target SL images to derive an enhanced SLimage.
 12. The method of claim 11, wherein the signal quality of thestructured light patterns reflected from one or more objects in thefield of view of the image sensor is evaluated based on the enhancednon-SL image and the enhanced initial SL image, or based on the enhancednon-SL image and the enhanced SL image.
 13. The method of claim 12,further comprising deriving depth information for one or more objects inthe field of view of the image sensor based on differences between theenhanced non-SL image and the enhanced SL image.
 14. The method of claim1, further comprising determining an exposure time for said capturing,by the image sensor, said one or more non-SL images, wherein theexposure time is determined to cause a highest pixel value, afteroutliers removed, for pixels around a middle region of said one or morenon-SL images is equal to or greater than a target pixel value.
 15. Themethod of claim 14, the target pixel value is in a range from 160 to 240for the image sensor with 8-bit outputs.
 16. An apparatus for capturingimages of a scene using a camera, the apparatus comprising: an imagesensor; one or more structured light sources; one or more processorscoupled to the image sensor and said one or more structured lightsources, wherein said one or more processors are configured to: capture,by the image sensor, one or more non-SL (non-structured light) imagesformed on a common image plane during one or more first frame periodswithout any structured light source on; capture, by the image sensor,one or more initial SL (structured light) images formed on the commonimage plane during one or more second periods by projecting structuredlight patterns in a visible spectrum with said one or more structuredlight source adjusted to generate initial structured light at one ormore initial intensity levels; evaluate signal quality of the structuredlight patterns reflected from one or more objects in a field of view ofthe image sensor based on said one or more non-SL images and said one ormore initial SL images; if the signal quality of the structured lightpatterns is below a threshold, repeating following steps until thesignal quality of the structured light patterns is equal to or above thethreshold: select one or more target intensity levels from a range or agroup comprising one target intensity level increased from at least oneprevious intensity level for said one or more structured light sources;capture, by the image sensor, one or more next SL images formed on thecommon image plane as one or more target SL images during one or morethird periods by projecting the structured light patterns in the visiblespectrum with said one or more target intensity levels selected; andevaluate signal quality of the structured light patterns reflected fromone or more objects in the field of view of the image sensor based onsaid one or more non-SL images and said one or more target SL images;and provide said one or more non-SL images and one or more final targetSL images, wherein said one or more final target SL images correspond tosaid one or more target SL images captured in a last iteration.
 17. Theapparatus of claim 16, wherein said one or more processors areconfigured to capture, by the image sensor, a regular image formed onthe common image plane using the image sensor during a regular frameperiod by setting the image sensor to a regular mode without anystructured light source on, wherein first lengths of said one or morefirst frame periods, said one or more second periods and said one ormore third periods are substantially less than a second length of theregular frame period.
 18. The apparatus of claim 17, wherein the firstlengths of said one or more first frame periods, said one or more secondperiods and said one or more third periods are equal to or less than ⅛of the second length of the regular frame period.
 19. The apparatus ofclaim 16, wherein the image sensor is set to a fast-capture mode duringcapturing said one or more non-SL images, said one or more initial SLimages and said one or more next SL images to cause said one or morefirst frame periods, first lengths of said one or more second periodsand said one or more third periods substantially shorter than a secondlength of the regular frame period.
 20. The apparatus of claim 19,wherein the fast-capture mode corresponds to configuring said one ormore processors to reduce bit depth associated with analog-to-digitalconverter (ADC) of the image sensor or spatial resolution, or increasingreadout gain of the image sensor with reference to a regular mode. 21.The apparatus of claim 16, wherein said one or more non-SL images, saidone or more initial SL images and said one or more next SL images arecaptured with reduced spatial resolution of the image sensor by settingthe image sensor to reduce spatial resolution by binning neighboringsensor pixels of a same color in an analog domain, or performeddigitally either inside or outside the image sensor.
 22. The apparatusof claim 16, wherein the signal quality of the structured light patternsreflected from one or more objects in a field of view of the imagesensor is evaluated according to signal-to-noise ratio, average signalor peak signal of the structured light patterns reflected from one ormore objects in a field of view of the image sensor.
 23. The apparatusof claim 16, wherein said one or more initial intensity levels aredetermined according to image intensities of said one or more non-SLimages and distance information between the camera and a target objectdetected by a distance sensor.
 24. The apparatus of claim 16, whereinsaid one or more structured light sources comprise multiple lightsources with different spectral densities, and said multiple lightsources are adjusted to maximize structured light to ambient-lightsignal ratio among color planes of the image sensor.
 25. The apparatusof claim 16, wherein said one or more initial intensity levels aredetermined according to ambient light information from an ambient lightsensor and distance information.
 26. The apparatus of claim 16, whereinsaid one or more processors are configured to apply averaging, medianfilter or outlier rejection to said one or more non-SL images to derivean enhanced non-SL image, to apply averaging, median filter or outlierrejection to said one or more initial SL images to derive an enhancedinitial SL image and to apply averaging, median filter or outlierrejection to said one or more target SL images to derive an enhanced SLimage.
 27. The apparatus of claim 26, wherein the signal quality of thestructured light patterns reflected from one or more objects in thefield of view of the image sensor is evaluated based on the enhancednon-SL image and the enhanced initial SL image, or based on the enhancednon-SL image and the enhanced SL image.
 28. The apparatus of claim 27,wherein said one or more processors are configured to derive depthinformation for one or more objects in the field of view of the imagesensor based on differences between the enhanced non-SL image and theenhanced SL image.
 29. The apparatus of claim 16, wherein said one ormore processors are configured to determine an exposure time for saidcapturing, by the image sensor, said one or more non-SL images, whereinthe exposure time is determined to cause a highest pixel value, afteroutliers removed, for pixels around a middle region of said one or morenon-SL images is equal to or greater than a target pixel value.
 30. Theapparatus of claim 29, the target pixel value is in a range from 160 to240 for the image sensor with 8-bit outputs.